from Base import Base
from selenium.webdriver.common.by import By
import time
class Page(Base):
    denglu_loc=(By.XPATH,'/html/body/div[1]/div/div[2]/ul/li[1]/a')
    def denglu(self):
        self.click(self.denglu_loc)
    name_loc=(By.XPATH,'//*[@id="theForm"]/div[1]/span[2]/input')
    def name(self):
        self.send_keys(self.name_loc,'13811033962')
    password_loc=(By.XPATH,'//*[@id="theForm"]/div[2]/span[2]/input')
    def password(self):
        self.send_keys(self.password_loc,'123456')
    dengluanniu_loc=(By.XPATH,'//*[@id="theForm"]/div[5]/a')
    def dengluanniu(self):
        self.click(self.dengluanniu_loc)
    def test_login(self):
        self.goto('http://10.59.9.12:7001/')
        self.denglu()
        time.sleep(2)
        self.name()
        self.password()
        time.sleep(10)
        self.dengluanniu()
        time.sleep(5)
